#include <QApplication>
#include <QTimer>
#include <QString>
#include <QTableView>
#include <QTextCodec>
#include <QCleanlooksStyle> /* GTK+ */

extern "C"{
int thread( int argc, char *argv[] );
}

#include "mainwindow.h"
#include "listbutton.h"

int thread( int argc, char *argv[] ){

    QApplication app( argc, argv );
    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
    app.setWindowIcon( QIcon(":/icon/sandcat-32.png") );
    app.setStyle(new QCleanlooksStyle());

    MainWindow mw( 0 );
    QObject::connect( &app, SIGNAL(aboutToQuit()), &mw, SLOT(shut_down()) );

    QTimer t( &mw );
    QObject::connect( &t, SIGNAL(timeout()), &mw, SLOT(timer_timeout()) );
    t.start( 100 );

    mw.show();
    return app.exec();
}
